#include "screenraw2valueby100.h"

namespace cores
{
    namespace devices
    {
        static ScreenRaw2ValueBy100PIN globalInstance;
        ScreenRaw2ValueBy100PIN::ScreenRaw2ValueBy100PIN(const uint32_t& screenNumber_) 
            : SR2ValHelper(screenNumber_)
        {
            init();
        }

        ScreenRaw2ValueBy100PIN::ScreenRaw2ValueBy100PIN(const string& screen_type) 
            : SR2ValHelper(screen_type)
        {
            init();
        }

        ScreenRaw2ValueBy100PIN::~ScreenRaw2ValueBy100PIN()
        {}

        void ScreenRaw2ValueBy100PIN::init()
        {
            /* 添加金额 */
            _amounts.reserve(9);
            _amounts.push_back(new SRNumData({5, 4, 3, 2, 1, 7, 6}));
            _amounts.push_back(new SRNumData({12, 11, 10, 9, 8, 14, 13}));
            _amounts.push_back(new SRNumData({20, 19, 18, 17, 16, 22, 21}));
            _amounts.push_back(new SRPtData(23));
            _amounts.push_back(new SRNumData({28, 27, 26, 25, 24, 30, 29}));
            _amounts.push_back(new SRPtData(31));
            _amounts.push_back(new SRNumData({37, 36, 35, 34, 33, 39, 38}));
            _amounts.push_back(new SRPtData(40));
            _amounts.push_back(new SRNumData({45, 44, 43, 42, 41, 47, 46}));

            /* 添加油量 */
            _volumes.reserve(9);
            _volumes.push_back(new SRNumData({95, 94, 90, 93, 92, 91, 89}));
            _volumes.push_back(new SRNumData({88, 87, 83, 86, 85, 84, 82}));
            _volumes.push_back(new SRNumData({80, 79, 75, 78, 77, 76, 74}));
            _volumes.push_back(new SRPtData(73));
            _volumes.push_back(new SRNumData({72, 71, 67, 70, 69, 68, 66}));
            _volumes.push_back(new SRPtData(64));
            _volumes.push_back(new SRNumData({63, 62, 58, 61, 60, 59, 57}));
            _volumes.push_back(new SRPtData(56));
            _volumes.push_back(new SRNumData({55, 54, 50, 53, 52, 51, 49}));
        }
    }
}